These functions are used by format-specific graphics exporters. When doing a standalone export, an exporter will typically call GraphicsExportGetInputImageDescription or GraphicsExportGetInputImageDimensions and GraphicsExportGetInputImageDepth to determine the image's bounds and depth, and then allocate an offscreen GWorld and call GraphicsExportDrawInputImage to draw portions of the image into the GWorld .
Returns an image description describing the input image.
pascal ComponentResult GraphicsExportGetInputImageDescription(
GraphicsExportComponent ci,
ImageDescriptionHandle *desc);
Returns the dimensions of the input image.
pascal ComponentResult GraphicsExportGetInputImageDimensions ( GraphicsExportComponent ci,
Rect *dimensions);
Returns the depth of the input image.
pascal ComponentResult GraphicsExportGetInputImageDepth ( GraphicsExportComponent ci,
long *inputDepth);
Draws a rectangular portion of the input image.
pascal ComponentResult GraphicsExportDrawInputImage (GraphicsExportComponent ci,
CGrafPtr gw,
GDHandle gd,
const Rect *srcRect,
const Rect *dstRect);
srcRect and dstRect need not be the same width and height; you can use this function to scale the image portion. This would be useful, for example, if you were writing a graphics exporter for a multiple-resolution format.
| Previous | Chapter Contents | Chapter Top | Next |